TagsInput widget


In [ ]:
from ipywidgets import TagsInput

tags = TagsInput(value=['pizza', 'burger', 'fries', 'nuggets', 'potatoes', 'tomatoes'])
tags.tag_style = 'primary'

tags

In [ ]:
tags.tag_style = 'warning'

In [ ]:
tags1 = TagsInput(value=['pizza', 'burger'])
tags1.tag_style = 'primary'
tags1.allowed_tags = ['pizza', 'burger', 'fries', 'nuggets', 'potatoes', 'tomatoes', 'ketchup']

tags1

ColorsInput widget


In [ ]:
from ipywidgets import ColorsInput

In [ ]:
colortags = ColorsInput(value=['red', 'green', 'rgb(200, 50, 200)', '#32a852'])
colortags

In [ ]:
colortags

In [ ]:
colortags1 = ColorsInput(value=['red', 'green'])
colortags1.allowed_tags = ['red', 'green', 'blue', 'yellow', 'purple']

colortags1

NumbersInput widget


In [ ]:
from ipywidgets import FloatsInput, IntsInput

In [ ]:
floatsinput = FloatsInput(value=[1.3, 4.56, 78.90])
floatsinput.tag_style = 'info'

floatsinput

In [ ]:
floatsinput.format = '.2f'

In [ ]:
intsinput = IntsInput(value=[1, 4, 22], min=0, max=23)
intsinput.tag_style = 'danger'

intsinput

In [ ]:
intsinput.format = '.2e'